<footer class="footer">
  <div class="footer-body container">
    <!-- Logo -->
    <div class="row footer-logo-row">
      <div class="col-md-12">
        <%= link to: webapp_url(@conn), class: "footer-brand" do %>
          <%= if logo_footer() do %>
            <img class="footer-logo" src="<%= static_path(@conn, logo_footer()) %>" alt="<%= subnetwork_title() %>" />
          <% end %>
          <%= if logo_text() do %>
            <span class="logo-text in-footer <%= unless logo_footer(), do: "no-logo" %>"> <%= logo_text() %> </span>
          <% end %>
        <% end %>
      </div>
    </div>

    <% other_explorers = other_explorers() %>
    <% col_size = if Enum.empty?(other_explorers), do: 3, else: 2 %>

    <div class="row">
      <div class="col-xs-12 col-lg-3">
        <p class="footer-info-text"><%= gettext("Blockscout is a tool for inspecting and analyzing EVM based blockchains. Blockchain explorer for Ethereum Networks.") %></p>
        <div class="footer-social-icons">
          <a href="<%= Application.get_env(:block_scout_web, :footer)[:github_link] %>" rel="noreferrer" target="_blank" class="footer-social-icon" title='<%= gettext("Github") %>'>
            <div class="footer-social-icon-container fontawesome-icon github"></div>
          </a>
          <a href="https://www.twitter.com/blockscoutcom/" rel="noreferrer" target="_blank" class="footer-social-icon" title='<%= gettext("Twitter") %>'>
            <div class="footer-social-icon-container fontawesome-icon twitter"></div>
          </a>
          <%= if Application.get_env(:block_scout_web, :footer)[:telegram_link_enabled] && Application.get_env(:block_scout_web, :footer)[:telegram_link] do %>
            <a href="<%= Application.get_env(:block_scout_web, :footer)[:telegram_link] %>" rel="noreferrer" target="_blank" class="footer-social-icon" title='<%= gettext("Telegram") %>'>
              <div class="footer-social-icon-container fontawesome-icon telegram"></div>
            </a>
          <% end %>
        </div>
      </div>

      <div class="col-xs-12 col-md-4 col-lg-<%= col_size %> footer-list">
        <h3>BlockScout</h3>
        <ul>
          <li><a href="<%= issue_link() %>" rel="noreferrer" class="footer-link" target="_blank"><%= gettext("Submit an Issue") %></a></li>
          <li><a href="<%= Application.get_env(:block_scout_web, :footer)[:github_link] %>" rel="noreferrer" class="footer-link"><%= gettext("Contribute") %></a></li>
          <li><a href="<%= Application.get_env(:block_scout_web, :footer)[:chat_link] %>" rel="noreferrer" class="footer-link"><%= gettext("Chat (#blockscout)") %></a></li>
          <%= if Application.get_env(:block_scout_web, :footer)[:forum_link_enabled] && Application.get_env(:block_scout_web, :footer)[:forum_link] do %>
            <li><a href="<%= Application.get_env(:block_scout_web, :footer)[:forum_link] %>" rel="noreferrer" class="footer-link"><%= gettext("Forum") %></a></li>
          <% end %>
          <%= render BlockScoutWeb.LayoutView, "_add_chain_to_mm.html" %>
        </ul>
      </div>
      <% main_nets = main_nets(other_networks()) %>

      <%= unless Enum.empty?(main_nets) do %>
        <div class="col-xs-12 col-md-4 col-lg-<%= col_size %> footer-list">
          <h3><%= gettext("Main Networks") %></h3>
          <ul>
            <%= for %{title: title, url: url} <- main_nets do %>
              <li><a href="<%= url %>" rel="noreferrer" class="footer-link"> <%= title %> </a></li>
            <% end %>
          </ul>
        </div>
      <% end %>

      <% test_nets = test_nets(other_networks()) %>

      <%= unless Enum.empty?(test_nets) do %>
        <div class="col-xs-12 col-md-4 col-lg-<%= col_size %> footer-list">
          <h3><%= gettext("Test Networks") %></h3>
          <ul>
            <%= for %{title: title, url: url} <- test_nets do %>
              <li><a href="<%= url %>" rel="noreferrer" class="footer-link"> <%= title %> </a></li>
            <% end %>
          </ul>
        </div>
      <% end %>

      <%= unless Enum.empty?(other_explorers) do %>
        <div class="col-xs-12 col-md-4 col-lg-<%= col_size %> footer-list">
          <h3><%= gettext("Other Explorers") %></h3>
          <ul>
            <%= for {name, url} <- other_explorers do %>
              <li><a href="<%= url %>" rel="noreferrer" class="footer-link"> <%= name %> </a></li>
            <% end %>
          </ul>
        </div>
      <% end %>
    </div>

    <% version = version() %>

    <%= unless ignore_version?(version) do %>
      <% release_link = release_link(version) %>
      <div>
        <%= gettext("Version") %>: <%= release_link %>
      </div>
    <% end %>
  </div>
</footer>
